-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synthetic events in separate sei endpoints #1867
Conversation
@@ -101,7 +103,7 @@ | |||
_ context.Context, | |||
crit filters.FilterCriteria, | |||
) (id ethrpc.ID, err error) { | |||
defer recordMetrics("eth_newFilter", a.connectionType, time.Now(), err == nil) | |||
defer recordMetrics(fmt.Sprintf("%s_newFilter", a.namespace), a.connectionType, time.Now(), err == nil) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
@@ -117,7 +119,7 @@ | |||
func (a *FilterAPI) NewBlockFilter( | |||
_ context.Context, | |||
) (id ethrpc.ID, err error) { | |||
defer recordMetrics("eth_newBlockFilter", a.connectionType, time.Now(), err == nil) | |||
defer recordMetrics(fmt.Sprintf("%s_newBlockFilter", a.namespace), a.connectionType, time.Now(), err == nil) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
@@ -133,7 +135,7 @@ | |||
ctx context.Context, | |||
filterID ethrpc.ID, | |||
) (res interface{}, err error) { | |||
defer recordMetrics("eth_getFilterChanges", a.connectionType, time.Now(), err == nil) | |||
defer recordMetrics(fmt.Sprintf("%s_getFilterChanges", a.namespace), a.connectionType, time.Now(), err == nil) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
@@ -184,7 +186,7 @@ | |||
ctx context.Context, | |||
filterID ethrpc.ID, | |||
) (res []*ethtypes.Log, err error) { | |||
defer recordMetrics("eth_getFilterLogs", a.connectionType, time.Now(), err == nil) | |||
defer recordMetrics(fmt.Sprintf("%s_getFilterLogs", a.namespace), a.connectionType, time.Now(), err == nil) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
func (a *FilterAPI) GetLogs( | ||
ctx context.Context, | ||
crit filters.FilterCriteria, | ||
) (res []*ethtypes.Log, err error) { | ||
defer recordMetrics("eth_getLogs", a.connectionType, time.Now(), err == nil) | ||
defer recordMetrics(fmt.Sprintf("%s_getLogs", a.namespace), a.connectionType, time.Now(), err == nil) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
@@ -260,7 +263,7 @@ | |||
_ context.Context, | |||
filterID ethrpc.ID, | |||
) (res bool) { | |||
defer recordMetrics("eth_uninstallFilter", a.connectionType, time.Now(), res) | |||
defer recordMetrics(fmt.Sprintf("%s_uninstallFilter", a.namespace), a.connectionType, time.Now(), res) |
Check warning
Code scanning / CodeQL
Calling the system time Warning
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1867 +/- ##
==========================================
- Coverage 61.64% 61.14% -0.51%
==========================================
Files 365 261 -104
Lines 26178 23182 -2996
==========================================
- Hits 16138 14175 -1963
+ Misses 8967 8007 -960
+ Partials 1073 1000 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c12b68a
to
6be061d
Compare
Describe your changes and provide context
Make sei_ specific endpoints that will serve synthetic txs with synthetic events alongside all the eth txs. A synthetic event are CW20 and CW721 wasm events that will get surfaced on the evm side, but only through these sei_ endpoints. The eth_ endpoints will continue to only serve native EVM txs. The reason why we needed to separate them is because when combined, we break indexing for any pure EVM indexer like The Graph.
This PR creates sei_ specific endpoints for any filter, block, or tx endpoint, so we now have:
The tx endpoints like eth_getTransactionByHash are left as-is because there's not really a need to exclude synthetic txs. They will just show synthetic tx info if you put in a tx hash that is for a synthetic one.
Testing performed to validate your change
unit tests + integration tests.